package com.jk.bgmainconsumer;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients
@EnableRedisHttpSession(maxInactiveIntervalInSeconds = 18000)
@Controller
public class BgMainConsumerApplication {

    public static void main(String[] args) {
        SpringApplication.run(BgMainConsumerApplication.class, args);
    }

    @RequestMapping("/index")
    public String tree(){
        return "index";
    }

    @RequestMapping("/expectGoods")
    public String expectGoods(){
        return "expectGoods";
    }






    /**
     * @description:  用户日志页面
     * @date: 2021/9/1 14:37
     */
    @RequestMapping("aa")
    public String userLogPage(){
        return "userLogPage";
    }

    /**
     * @description:  订单日志页面
     * @date: 2021/9/1 14:37
     */
    @RequestMapping("/bb")
    public String logPage(){
        System.out.println("---------------------------------------temi");
        return "orderLog";
    }

    /**
     * @description:  轮播图页面
     * @date: 2021/9/1 14:37
     */
    @RequestMapping("/slideshow1")
    public String userLogPage2(){
        System.out.println("---------------------------------------temi");
        return "slideshow1";
    }
    /**
     * @description:  轮播图页面
     * @date: 2021/9/1 14:37
     */
    @RequestMapping("/slideshow2")
    public String userLogPage3(){
        System.out.println("---------------------------------------temi");
        return "slideshow2";
    }

    @RequestMapping("cc")
    public String admin(){
        System.out.println("---------------------------------------temi");
        return "administratorPage";
    }

    /**
     * @description: 全部订单页面
     * @return
     */
    @RequestMapping("/allOrders")
    public  String allOrders(){
        return  "allOrders";
    }

    /**
     * @description: 待处理订单页面
     *      * @return
     */
    @RequestMapping("/pending")
    public  String pending(){
        return  "pending";
    }

    /**
     * @description:  用户优惠券类型表
     * @param: []
     * @return: java.lang.String
     * @author 刘杨彬
     * @date: 2021/9/3 12:55
     */
    @RequestMapping("/discountPage")
    public  String discountPage(){
        return  "discountPage";
    }



    @RequestMapping("/admLogin")
    public String admLogin(){
        return "admLogin";
    }
    //新增座位
    @RequestMapping("/addSite")
    public String addSite(Integer sessionId,Integer count,Model model){
        model.addAttribute("sessionId",sessionId);
        model.addAttribute("count",count);
        return "addSite";
    }
    //查看座位
    @RequestMapping("/showSite")
    public String showSite(Integer sessionId,Model model){
        model.addAttribute("sessionId",sessionId);
        return "showSite";
    }
}